#ifndef __2865031_BACKGROUND_SUBSTRACTION_H__
#define __2865031_BACKGROUND_SUBSTRACTION_H__

#include "basicmethod.h"
#include "singlegaussiandistribution.h"
#include "mixtureofgaussian.h"
#include "lbp.h"
#include "opticalflow.h"

#include <string>
#include <iostream>

using namespace std;

enum Method { id , Basic_Method , Single_Gaussian_Distribution, Mixture_Of_Gaussian, Lbp, Optical_Flow, all };


//! Class BackgroundSubstraction - Global Class for Background substraction methods
/*!
    This class manage avi file and video stream from any webcam on your pc. It uses OpenCV library to read, write and display any video stream.
    The main goal here is to have a golbal class that manage video stream and method(s) of Background Substraction wou want to apply.
*/
class BackgroundSubstraction
{
    protected:

        Method  method;
        string  fileName;

        CvCapture * capture;

        Processor * proc;

        Processor * allocProcessor(const Method &);

    public:

        BackgroundSubstraction();
        ~BackgroundSubstraction();
        BackgroundSubstraction(const BackgroundSubstraction &);
        BackgroundSubstraction& operator=(const BackgroundSubstraction &);

        BackgroundSubstraction(const Method &, const string &);

        void setMethod(const Method &);

        Method getMethod() const;

        void run();


};

#endif
